package com.pig4cloud.pig.base.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * packageName com.pig4cloud.pig.base.config
 *
 * @author marco
 * @className ServiceConfiguration (此处以class为例)
 * @date 2024/5/31
 * @description TODO
 */
@Configuration
public class ServiceConfiguration {
	@Value("${spring.cloud.nacos.discovery.server-addr}")
	private  String HOST;
	@Value("${spring.cloud.nacos.username}")
	private  String USERNAME;
	@Value("${spring.cloud.nacos.password}")
	private  String PASSWORD;
	@Bean
	public void initConfiguration() {
		BaseUtil.setHOST("http://"+HOST);
		BaseUtil.setUSERNAME(USERNAME);
		BaseUtil.setPASSWORD(PASSWORD);
	}
}
